package mensch;

public class Field {
	
	private int fieldIndex;
	private String title;
	private String imageFilename;
	private Pawn pawnOnField = null;
	
	public Field(int fieldIndex) {
		this.fieldIndex = fieldIndex;
		title = "Feld " + (fieldIndex+1);
		imageFilename = "field";
		
		switch (fieldIndex) {
		case 0:
			title += ": erstes Feld Spieler 1";
			imageFilename = "field1";
			break;
		case 9:
			title += ": letztes Feld Spieler 2";
			break;
		case 10:
			title += ": erstes Feld Spieler 2";
			imageFilename = "field2";
			break;
		case 19:
			title += ": letztes Feld Spieler 3";
			break;
		case 20:
			title += ": erstes Feld Spieler 3";
			imageFilename = "field3";
			break;
		case 29:
			title += ": letztes Feld Spieler 4";
			break;
		case 30:
			title += ": erstes Feld Spieler 4";
			imageFilename = "field4";
			break;
		case 39:
			title += ": letztes Feld Spieler 1";
			break;
		case 40:
		case 41:
		case 42:
		case 43:
			title += ": Startfeld Spieler 1";
			imageFilename = "field1";
			break;
		case 44:
		case 45:
		case 46:
		case 47:
			title += ": Startfeld Spieler 2";
			imageFilename = "field2";
			break;
		case 48:
		case 49:
		case 50:
		case 51:
			title += ": Startfeld Spieler 3";
			imageFilename = "field3";
			break;
		case 52:
		case 53:
		case 54:
		case 55:
			title += ": Startfeld Spieler 4";
			imageFilename = "field4";
			break;
		case 56:
		case 57:
		case 58:
		case 59:
			title += ": Zielfeld Spieler 1";
			imageFilename = "field1";
			break;
		case 60:
		case 61:
		case 62:
		case 63:
			title += ": Zielfeld Spieler 2";
			imageFilename = "field2";
			break;
		case 64:
		case 65:
		case 66:
		case 67:
			title += ": Zielfeld Spieler 3";
			imageFilename = "field3";
			break;
		case 68:
		case 69:
		case 70:
		case 71:
			title += ": Zielfeld Spieler 4";
			imageFilename = "field4";
			break;
		}
	}
	
	public String getTitle() {
		return title;
	}
	
	public String getImageFilename() {
		return imageFilename;
	}
	
	public Pawn getPawnOnField() {
		return pawnOnField;
	}
	
	public void setPawnOnField(Pawn pawnOnField) {
		this.pawnOnField = pawnOnField;
	}
	
	public void removePawnFromField() {
		pawnOnField = null;
	}
	
	public int getFieldIndex() {
		return fieldIndex;
	}
}
